<template>
    <div>
        <el-tree ref="menuNode" :data="data" show-checkbox node-key="menuId" :default-expand-all="true"
            :props="defaultProps">
        </el-tree>
    </div>
</template>

<script>    
    import { GetTreeNodes } from '@/api/menu';
    export default {
        name: 'RbacProjectUiAssignPermission',

        data() {
            return {
                data: [],
                defaultProps: {
                    children: 'child',
                    label: 'menuName'
                }
            };
        },

        mounted() {
            this.loadData();
        },

        methods: {
            loadData() {
                GetTreeNodes().then(m => {
                    this.data = m.data;
                });
            }
        },
    };
</script>